From: Florian Müllner Date: Sun, 24 Feb 2019 01:21:56 +0000 (+0100) Subject: appsMenu: Fix initial visibility of "Details" item X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~888^2^2~38 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=572d54981ed47e1ddd3eae786d725ee26c3756c4;p=gnome-shell.git appsMenu: Fix initial visibility of "Details" item It is only supposed to be visible when Software is installed, but we currently only update the visibility on changes. https://gitlab.gnome.org/GNOME/gnome-shell/issues/989 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index 2e2a6592d..1d9621ae3 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -110,9 +110,14 @@ class AppMenu extends PopupMenu.PopupMenu { }); this._appSystem.connect('installed-changed', () => { - let sw = this._appSystem.lookup_app('org.gnome.Software.desktop'); - this._detailsItem.actor.visible = (sw != null); + this._updateDetailsVisibility(); }); + this._updateDetailsVisibility(); + } + + _updateDetailsVisibility() { + let sw = this._appSystem.lookup_app('org.gnome.Software.desktop'); + this._detailsItem.actor.visible = (sw != null); } isEmpty() {